﻿//-----------------------------------------------------------------------------------------------------------
// Wbfs Engine (WBFSe) Project by Omega Frost 
// http://wbfse.codeplex.com/
//
// WBFSe is Licensed under the terms of the 
// Microsoft Reciprocal License (Ms-RL)
//-----------------------------------------------------------------------------------------------------------
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace WBFSe.Attributes
{
    /// <summary>
    /// Indicates a special region of the disc modified during build
    /// </summary>
    public class FixData
    {
        // Variables

        private long position;
        private byte[] data;

        // Properties

        /// <summary>
        /// The position of the data in the disc
        /// </summary>
        public long Position
        {
            get { return this.position; }
        }

        // Methods

        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="pos">Position of the data</param>
        /// <param name="data">Data</param>
        public FixData(long pos, byte[] data)
        {
            this.position = pos;
            this.data = data;
        }

        /// <summary>
        /// Copies the data
        /// </summary>
        /// <param name="buffer">Output buffer</param>
        /// <param name="index">Offset in buffer</param>
        public void GetData(Byte[] buffer, int offset)
        {
            data.CopyTo(buffer, offset);
        }
    }
}
